﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiteratureManage.Domain.Services
{
    using LiteratureManage.Domain.DataBackup;

    public class DBBackupService : IDBBackupService
    {
        private readonly IDBBackupProvider _provider;

        public DBBackupService(IDBBackupProvider provider)
        {
            this._provider = provider;
        }

        #region IDBBackupService Members

        public void Backup(DateTime theDate)
        {
            this._provider.Backup(theDate);
        }

        public void Restore(string dbBackupFile)
        {
            this._provider.Restore(dbBackupFile);
        }

        public void Delete(string dbBackupFile)
        {
            this._provider.Delete(dbBackupFile);
        }

        public string GetDBBackupFilePath(string dbBackupFile)
        {
            return this._provider.GetDBBackupFilePath(dbBackupFile);
        }

        public IList<DBBackupFileInfo> GetBackupFiles()
        {
            return this._provider.GetBackupFiles();
        }

        #endregion
    }
}
